1. Field of the Invention
The present invention relates generally to systems and methods for filtering electrical signals. In particular, the present invention relates to a system and method for improving the quality of compressed digital video signals with a filtering method that reduces noise and preserves the significant details of the video sequence. Still more particularly, the present invention relates to a system and method for performing spatial-temporal filtering on video data.
2. Description of the Background Art
Digital video filtering is the process applied to a digital video sequence before or/and after compression and decompression that reduces the amount of noise and details in the sequence so that the quality of the digital video is enhanced. The prior art provides a variety of systems and methods for performing digital video filtering. For example, the use of temporal filtering for video coding is well known in the prior art. There have been a variety of attempts to increase video quality using specific types of temporal filtering. Temporal noise can be reduced by simple frame averaging, however, it is at the expense of blurring the moving objects.
Another prior art approach has also tried to resolve this deficiency in temporal filtering and avoid the blurring of moving objects. To permit noise reduction in the moving objects, this other prior art approach extracted motion information between the successive frames to bring the objects in line with each other. The extraction of the motion information is generally carried out on a blocks of pixels basis. Since the moving objects hardly line up with block exactly, there exists an ambiguity between the background and moving information. There is yet another prior art approach that utilizes the information in the current, prior and future frames to improve the subsequent coding efficiency. However, this process requires additional memory and additional delay because of the use of information in the future frames.
In still further prior art approaches, different filter coefficients have been used. The relative weighting (filtering coefficients) applied to the pixel in the current frame and the pixels in the prior/future frames are generally variable and can be predetermined. In one method, time-varying filtering coefficients dependent upon the relative motion between a block of current pixels and stored pixels was used to determine the extent of filtering. In a second method, the video frames are classified into different regions dependent upon the moving objects and different filtering coefficients are applied to the regions. However, the difficulty with these prior art approaches is that since the filtering is performed on fixed blocks or regions of pixels, the filtering process introduces undesirable blocking artifacts.
To extend the filtering process beyond the temporal domain, a motion adaptive spatial filter, that takes advantage of human visual system""s inability to discriminate details in moving regions, was introduced to filter the moving objects. The same scheme was proposed to reduce the temporal aliasing resulting from coding video at less than its original frame rate. While this results in better image quality, it introduces significant delay in processing because the motion adaptive spatial filter must be cascaded with the temporal filter. Moreover, these prior art filtering processes introduce undesired spatial blurring of edge and motion information.
An attempt to improve the temporal and spatial filtering described above, the prior art has also alternatively used temporal and spatial filtering. One prior art method uses a temporal filter on those blocks of pixels with insignificant changes, and a spatial filter for those blocks of pixels with significant changes to smooth out the block pixels. In another filtering method, a similar alternatively temporal or spatial filter was used as a post-processing technique to reduce the artifacts of the video sequences generated by block-based, motion compensated transform coding. The difficulty with both these prior art solutions is that it is very difficult to determine which block to filter with the spatial filter and which block to filter with the temporal filter. This in turn can cause the resulting hardware and software for performing filtering to be complex and expensive. Furthermore, since the filtering is done on a block-by-block basis, undesirable artifacts continue to be introduced by the filtering.
Therefore, there is a need for a system and method for digital video filtering such that significant edge information and motion changes are preserved while reducing noise using minimal amounts of memory storage and introducing minimal delay.
The present invention overcomes the deficiencies and limitations of the prior art with a system and method for performing spatial-temporal filtering on video data. The system and method of the present invention are particularly advantageous because they filter in both spatial and temporal domain in a single step with the filtering coefficients that can be varied depending upon the complexity of the video and the motion between the adjacent frames. The present invention is also advantageous because it preserves significant edges in video sequence; it preserves motion changes in video sequences; it reduces noise; and it uses minimal memory storage and introduces minimal processing delay.
The present invention is a filter that is used in a video processing system and is alternatively used to process raw video data before compression or process video data after it has been compressed and decompressed. A preferred embodiment of a filter constructed according to the present invention comprises: a IIR filter, a threshold unit, and a coefficient register. The IIR filter and threshold unit are coupled to receive video data. The IIR filter is also coupled to the coefficient register and the threshold unit. The IIR filter receives coefficients, a, from the coefficient register and uses them to filter the video data received. The IIR filter is preferably a 2-tap recursive IIR filter, and provides single step temporal and spatial filtering. The filtered data output by the IIR filter is sent to the threshold unit. The threshold unit compares the absolute value of the difference between the filtered data and the raw video data to a threshold value from the coefficient register, and then outputs either the raw video data if the difference is above the threshold, or outputs the filtered data if the difference is not above the threshold.
A preferred method for performing filtering according to the present invention comprises the steps of: identifying and receiving the pixel data that is to be filtered; filtering the identified pixel data recursively with an IIR filter to produce filtered data; reducing the identified pixel data by the filtered data to produced a reduced value (y-x); determining whether the absolute value of the reduced value is greater than a threshold; outputting the identified pixel data if the absolute value of the difference between the filtered data and the raw video data is greater than a threshold; and outputting the filtered data if the absolute value of the difference between the filtered data and the raw video data is not greater than a threshold. The present invention also includes other methods for filtering in parallel the pixel data in one step for the horizontal, vertical and temporal dimensions.